<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>选项合并</title>
  <script src="vue.js"></script>
</head>
<body>
<script>
  var mixin = {
    created () {
      console.log('mixin钩子调用')
    }
  }
  var vm = new Vue({
    mixins: [mixin],
    created () {
      console.log('组件钩子调用')
    }
  })
  // -> "mixin钩子被调用"
  // -> "组件钩子被调用"
</script>
</body>
</html>